package com.cloudDemoOrder.service;

import entity.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author Daft_V
 * @date 2022/5/6 19:14
 */
@FeignClient(value = "server-user")//value用于指定调用nacos下的哪个服务
public interface UserFeignService {

    /**
     * 根据用户id查询用户
     *
     * @param id 用户id
     * @return User
     */
    @GetMapping("/user/queryUserById")
    User queryUserById(@RequestParam("id") int id);
}
